﻿@using WebSite.Views;
@using WebSite.ViewModels;

@model WebSite.ViewModels.IndexViewModels.IndexGridButtonsViewModel

@foreach (ButtonType buttonType in Model.ButtonTypes)
{
    switch (buttonType)
    {
        case ButtonType.Edit:
            <span title="Editar" class="t-button t-grid-edit t-button-icon" style="margin-bottom:5px">
                @Html.ActionLink(" ", "Edit", new { id = Model.Model.Id }, new { @class = "t-icon t-edit" })
            </span>
            break;
        case ButtonType.Delete:
            <span title="Excluir" class="t-button t-grid-delete t-button-icon" style="margin-bottom:5px">
                @Html.ActionLink(" ", "Delete", new { id = Model.Model.Id }, new { @class = "t-icon t-delete" })
            </span>
            break;
        case ButtonType.Duplicate:
            <span title="Duplicar" class="t-button t-button-icon" style="margin-bottom:5px">
                @Html.ActionLink(" ", "Duplicate", new { id = Model.Model.Id }, new { @class = "duplicate" })
            </span>
            break;
        case ButtonType.Print:
            <span title="Imprimir" class="t-button t-button-icon" style="margin-bottom:5px">
                @Html.ActionLink(" ", "Print", new { id = Model.Model.Id }, new { @class = "print", target = "_blank" })
            </span>
            break;
        case ButtonType.CreatePedido:
            <span title="Criar Pedido" class="t-button t-button-icon" style="margin-bottom:5px">
                @Html.ActionLink(" ", "CreateTargettedPedido", "Pedido", new { targetId = Model.Model.Id, targetType = Model.Model.GetType().ToString() }, new { @class = "createPedido" })
            </span>
            break;
    }
}
